package org.dx.oho.entity;

import java.util.Date;
import java.util.Objects;

/**
 * create by duanx 2020/11/5
 *@description： 本地账号信息表
 *@classname: LocalAuth
 *@author: duanx
 *@date: 2020/11/5 16:13
 **/
public class LocalAuth extends BaseEntity{
    /**
     * 本地账户ID
     */
    private Long localAuthId;
    /**
     * 用户个人信息
     */
    private PersonInfo personInfo;
    /**
     * 昵称
     */
    private String userName;
    /**
     * 密码
     */
    private String password;

    public Long getLocalAuthId() {
        return localAuthId;
    }

    public void setLocalAuthId(Long localAuthId) {
        this.localAuthId = localAuthId;
    }

    public PersonInfo getPersonInfo() {
        return personInfo;
    }

    public void setPersonInfo(PersonInfo personInfo) {
        this.personInfo = personInfo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LocalAuth localAuth = (LocalAuth) o;
        return Objects.equals(localAuthId, localAuth.localAuthId) &&
                Objects.equals(personInfo, localAuth.personInfo) &&
                Objects.equals(userName, localAuth.userName) &&
                Objects.equals(password, localAuth.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(localAuthId, personInfo, userName, password);
    }

    @Override
    public String toString() {
        return "LocalAuth{" +
                "localAuthId=" + localAuthId +
                ", personInfo=" + personInfo +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
